package com.niii.statistics.controller;

import com.niii.statistics.common.Result;
import com.niii.statistics.common.StatusCode;
import com.niii.statistics.service.ProvincialgdpService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Api(tags = "Provincialgdp",description = "浙江省年份GDP（一、二、三产业）")
@RestController
@RequestMapping(value = "/Provincialgdp")
@CrossOrigin(origins ="*" , maxAge = 3600)
public class ProvincialgdpController {

    @Autowired
    private ProvincialgdpService provincialgdpService;

    @RequestMapping(value = "/getAll",method = RequestMethod.GET)
    public Result getAll(){
        return new Result(true, StatusCode.OK,"查询成功",provincialgdpService.getAll());
    }

    @RequestMapping(value = "/getProvincial",method = RequestMethod.GET)
    public Result getProvincial(@RequestParam String provincialName){
        return new Result(true, StatusCode.OK,"查询成功",provincialgdpService.getProvincial(provincialName));
    }


}
